﻿@model IEnumerable<PilotProject.TestToken>

<style type="text/css">
.webGrid{margin:10px 10px 10px 10px; border-collapse:collapse;width:850px;font: 11px Verdana, Arial, Helvetica, sans-serif color:#5D5D5D;}

.header{background:#E8E8E8; color:#FFF;text-decoration:none;border-collapse:collapse;height:40px;border-bottom:3px solid white}

.webGrid td {border-bottom:3px solid white; padding:5px;height:40px;  background-color:#F4F4F4;}
.img{background:url('/Content/items1/img/rte/editIco.png')no repeat; display: block;}
.alt td{background-color:#E8E8E8; }

.person{width:50px; }
.text{width:500px;}
.date{width:250;}
.links{min-width:70px;text-decoration:none;
       color:#CCC;
       
       }
</style>

 @{  
        var grid = new WebGrid(Model, rowsPerPage: 10, canPage: true, canSort: true, defaultSort: "CreateDateTime", ajaxUpdateContainerId: "myGrid");
        
        grid.Pager(WebGridPagerModes.All);
        
            @grid.GetHtml(
            tableStyle: "webGrid",
            headerStyle: "header",
            alternatingRowStyle: "alt",
            columns: grid.Columns(


            grid.Column("Id", "Test Token Id", canSort: false, style: "date"),
            grid.Column("TestDate", "Test Date", canSort: true, style: "date"),
            grid.Column("FirstName", "First Name", canSort: false, style: "person"),
            grid.Column("LastName", "Last Name", canSort: false, style: "person"),
            grid.Column("Edit", canSort:false, style: "links",format: (item) => Html.ActionLink("Edit", "Edit", new { id = item.Id },new {@class="img"}))
                     ))

         
  }